package com.woniu.woniuticket.controller;

import com.woniu.woniuticket.entity.ShowSession;
import com.woniu.woniuticket.service.IShowSessionService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Lucas
 * @since 2020-02-19
 */
@RestController
//@RequestMapping("/show-session")
@CrossOrigin("*")
public class ShowSessionController {

    @Resource
    private IShowSessionService iShowSessionService;

    @RequestMapping("findshowtime")
    @ResponseBody
    public List getMovietime(HttpSession session, Integer id){

        List<ShowSession> show=iShowSessionService.findtime(1);

        System.out.println(show);

        return show;
    }

}

